﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Net.Mail;
using DevExpress.XtraEditors;

namespace COMOSOFT
{
    public partial class FrmEX : Form
    {
        public FrmEX()
        {
            InitializeComponent();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //try
            //{
            //    MailMessage mail = new MailMessage();
            //    SmtpClient smtp = new SmtpClient();
            //    smtp.Host = "smtp.gmail.com";
            //    smtp.Port = 587;
            //    smtp.Credentials = new System.Net.NetworkCredential("dinhdongcntt@gmail.com", "Dong_OuIt@2711");
            //    //smtp.Credentials = new System.Net.NetworkCredential("msoft@huynhle.com", "motivessoft2011");
            //    smtp.EnableSsl = true;
            //    smtp.DeliveryMethod = SmtpDeliveryMethod.Network;               

            //    mail.From = new MailAddress("dinhdongcntt@gmail.com");
            //    mail.Sender = new MailAddress("dinhdongcntt@gmail.com");
            //    //mail.ReplyTo = new MailAddress("dinhdongcntt@gmail.com");
            //    mail.To.Add(new MailAddress("copperdinhit@gmail.com"));
            //    mail.Subject = "test mail";
            //    mail.Body = "Hello world";
            //    mail.IsBodyHtml = true;

            //    smtp.Send(mail);
            //    MessageBox.Show("Sent mail");                               
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show(ex.Message);
            //}

            byte[] img = System.IO.File.ReadAllBytes(@"D:\\picture1.png");
            imageEdit1.EditValue = img;           
        }

        private void imageEdit1_EditValueChanged(object sender, EventArgs e)
        {
           
        }       
    }
}
